{
	time = $1;
	device = $2;
	nb_if = $3;
	eventName = $4;

	if (eventName=="EVENT_TYPE_NEIGHBOR_INTERFACE_UP" && downTime>0 && nb_if==downInterface) {
		print time-downTime; 
		downInterface = 0;
		downTime = 0;
	}

	if (eventName=="EVENT_TYPE_NEIGHBOR_INTERFACE_DOWN") {
		downInterface = nb_if;
		downTime = time;
	};
}